<template>
  <div class="page">
    <div class="bg-box">
      <img src="../../assets/img/pic_home@2x.png" alt="">
      <div class="userInfo-box">
        <span>何露露</span>
        <span>管理员</span>
      </div>
      <div class="setup-btn">
        <img src="../../assets/img/ic/setting_white_home@2x.png" alt=""  @click="toSetup()">
      </div>
    </div>
    <div class="icon-box">
      <div class="vux-1px-r" @click="toGrantCoupon()">
        <img src="../../assets/img/ic/coupon_home@2x.png" alt="">
        <span>发放优惠券</span>
      </div>
      <div class="vux-1px-r" @click="toGrantAuthority()">
        <img src="../../assets/img/ic/authorization_home@2x.png" alt="">
        <span>发券授权</span>
      </div>
      <div @click="toCouponList()">
        <img src="../../assets/img/ic/buycoupon_home@2x.png" alt="">
        <span>购买优惠券</span>
      </div>
      <div class="vux-1px-t vux-1px-r" @click="toMyCoupon()">
        <img src="../../assets/img/ic/mycoupon_home@2x.png" alt="">
        <span>我的优惠券</span>
      </div>
      <div class="vux-1px-t vux-1px-r" @click="toTradeRecord()">
        <img src="../../assets/img/ic/trading_home@2x.png" alt="">
        <span>交易流水</span>
      </div>
      <div class="vux-1px-t" @click="toCouponReport()">
        <img src="../../assets/img/ic/form_home@2x.png" alt="">
        <span>券报表</span>
      </div>
      <div class="vux-1px-t vux-1px-r">
        <img src="../../assets/img/ic/question_home@2x.png" alt="">
        <span>问题与帮助</span>
      </div>
      <div class="vux-1px-t vux-1px-r">
        <img src="../../assets/img/ic/about_home@2x.png" alt="">
        <span>关于我们</span>
      </div>
      <div class="vux-1px-t"></div>
    </div>
  </div>
</template>

<script>
  export default {
    data(){
      return{
        title:'服务大厅'
      }
    },
    created(){
      this.$store.commit('setTitle',this.title)
      this.$store.commit('setShowCloseBtn',false)
    },
    methods: {
      toSetup(){ //设置
        this.$router.push({path:'/setup'})
      },
      toCouponList(){ //购买优惠券
        this.$router.push({path:'/buyCoupon'})
      },
      toTradeRecord(){ //交易记录
        this.$router.push({path:'/tradeRecord'})
      },
      toMyCoupon(){ //我的优惠券
        this.$router.push({path:'/myCoupon'})
      },
      toGrantCoupon(){ //发放优惠券
        this.$router.push({path:'/grantCoupon'})
      },
      toGrantAuthority(){ //发券授权
        this.$router.push({path:'/grantAuthority'})
      },
      toCouponReport(){ //券报表
        this.$router.push({path:'/couponReport'})
      }
    }
  }
</script>

<style lang="less" scoped>
.bg-box{
  margin-bottom: 20px;
  position: relative;
  display: flex;
  align-items:center; //垂直居中
  height: 250px;
  line-height: 250px;
  width: auto;
  background-image: linear-gradient(-136deg, #35A6F7 0%, #1875ED 100%);
  img:first-child{
    margin-left: 30px;
    width: 130px;
    height: 130px;
  }
  .setup-btn{
    position: absolute;
    right: 30px;
    height: 100%;
   img{
      width: 48px;
      height: 48px;
   }
  }
  .userInfo-box{
    margin-left: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 250px;
    span{   
      font-size: 24px;
    }
    span:first-child{
      color: #fff;
      height: 40px;
      line-height: 40px;
      font-size: 36px;
    }
    span:last-child{
      height: 24px;
      line-height: 24px;
      margin-top:10px;
      color: rgba(255,255,255,0.87);
    }
  }
}
.icon-box{
  height: 750px;
  // border: 1px solid red;
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  div{
    flex: 0 0 33.3333%;
    height: 250px;
    width: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    img{
      width: 72px;
      height: 72px;
    }
    span{
      font-size: 28px;
      color: #5B5F62;
      margin-top: 10px;
    }
  }
}
</style>
